package com.itheima.service.impl;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.itheima.service.SensitiveWordFilterService;
import com.itheima.utils.SensitiveWordFilterUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <h1>敏感词过滤服务实现类</h1>
 *
 * @author <a href="515857087@qq.com">叶世铭</a>
 * @since 2022/12/7
 */
@Service
public class SensitiveWordFilterServiceImpl implements SensitiveWordFilterService {

    @Resource
    private SensitiveWordFilterUtil sensitiveWordFilterUtil;

    @Override
    public String filter(String txt) throws JsonProcessingException {
        String res = sensitiveWordFilterUtil.filter(txt);
        return res;
    }
}
